package validation.jexp;

import java.util.Arrays;
import java.util.List;
import java.util.Objects;

public class FeedType {
    private String type;

    public FeedType(String type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FeedType feedType = (FeedType) o;
        return Objects.equals(type, feedType.type);
    }

    @Override
    public int hashCode() {
        return type != null ? type.hashCode() : 0;
    }

    @Override
    public String toString() {
        return type;
    }

    public final static FeedType RSS_09 = new FeedType("RSS_09");
    public final static FeedType RSS_093 = new FeedType("RSS_093");
    public final static FeedType RSS_20 = new FeedType("RSS_20");
    public final static FeedType ATOM_03 = new FeedType("ATOM_03");
    public final static List TYPES = Arrays.asList(new FeedType[] {RSS_09, RSS_093, RSS_20, ATOM_03});
}
